package composite.menu;

public class MenuItem extends MenuComponent{
	String name;
	String description;
	boolean vegetarian;
	double price;

	public MenuItem(String name, String description, boolean vegetarian,
			double price) {
		this.name = name;
		this.description = description;
		this.vegetarian = vegetarian;
		this.price = price;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}

	public double getPrice() {
		return price;
	}

	public boolean isVegetarian() {
		return vegetarian;
	}

	public String toString() {
		return (name + ", $" + price + "\n   " + description);
	}
	
	public void print(){
		System.out.print("  "+getName());
		if(isVegetarian()){
			System.out.print("(V)");
		}
		System.out.println(","+getPrice());
		System.out.println("-----"+getDescription());
	}
}
